Change search to match every sub part #1054
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The search in Thunderstore is currently barely usable for searches with more than one term.
Instead of matching any part of the query in any field, this matches every part in any field. I.e. all parts must be in the name, description or author name, not only one part. Similar how r2modman works.
For example in Valheim, searching 'Epic Loot' returns about 100 packages (4 pages), with the actual package burred in the last page because it is named 'EpicLoot'. Most of the other packages are completely unrelated but either contain 'Epic' or 'Loot' somewhere.
With this PR, the result is only about 6 packages related and including EpicLoot (in my dev environment that is populated with Valheim package names).
Overall, this makes the search more strict. However, this is usually the expected behaviour. Adding more terms to the search should narrow down the results, not give more matches.